// 类型定义
export type PanelType
  = | 'note'
    | 'attention'
    | 'caution'
    | 'danger'
    | 'error'
    | 'hint'
    | 'important'
    | 'tip'
    | 'warning'

export interface PanelProps {
  id: string
  type?: PanelType
  title?: string
  content: string
  collapsible?: boolean
  className?: string
  timeContent?: string
  onToggle?: () => void
}

export const DEFAULT_PANEL_PROPS: Partial<PanelProps> = {
  type: 'note',
  collapsible: false,
}

// 类型配置映射
export const PANEL_TYPE_CONFIG = {
  note: {
    borderColor: '#276be9',
    backgroundColor: '#dce7fc',
    icon: 'ℹ️',
  },
  attention: {
    borderColor: '#f66a0a',
    backgroundColor: '#f8e3d0',
    icon: '👀',
  },
  caution: {
    borderColor: '#f66a0a',
    backgroundColor: '#f9e1e4',
    icon: '⚠️',
  },
  danger: {
    borderColor: '#d72d47',
    backgroundColor: '#ff6b6b',
    icon: '❗',
  },
  error: {
    borderColor: '#d72d47',
    backgroundColor: '#ff6b6b',
    icon: '❌',
  },
  hint: {
    borderColor: '#00843f',
    backgroundColor: '#d6ece1',
    icon: '💡',
  },
  important: {
    borderColor: '#f66a0a',
    backgroundColor: '#f9e1e4',
    icon: '⭐',
  },
  tip: {
    borderColor: '#00843f',
    backgroundColor: '#d6ece1',
    icon: '✨',
  },
  warning: {
    borderColor: '#f66a0a',
    backgroundColor: '#f9e1e4',
    icon: '⚠️',
  },
}
